package com.example.springcloud.feign.api;

import com.example.springcloud.feign.api.dto.UserDTO;
import com.example.springcloud.rpc.api.PageRequest;
import com.example.springcloud.rpc.api.PageResponse;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author fanhang
 */
public interface UserApi {

    @GetMapping("/user/hello")
    String hello(@RequestParam("name") String name);

    @GetMapping("/user/getUser")
    UserDTO getUser(@RequestParam("id") Long id);

    @PostMapping("/user/getUserList")
    PageResponse<UserDTO> getUserList(@RequestBody PageRequest page);
}
